package com.gscitysfy.cus.drain.modules.duty.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gscitysfy.cus.drain.modules.duty.entity.MoperDutyEtHoliday;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author 钱小龙
 * @version 1.0.0
 * @ClassName MoperDutyHolidayMapper
 * @Description 值班节假日管理
 * @creatTime 2022-03-31 16:47:17
 */
@Repository
public interface MoperDutyHolidayMapper extends BaseMapper<MoperDutyEtHoliday> {

    /**
     * 查询工作日，非工作日
     * @param page
     * @param coamHoliday
     * @param coamWorkdayFlag
     * @return
     */
    IPage<Map<String, Object>> getHoliday(Page<Map<String, Object>> page, @Param("coamHoliday") String coamHoliday,@Param("coamWorkdayFlag") String coamWorkdayFlag);


    /**
     * 修改工作日，非工作日
     * @param moperDutyEtHoliday
     * @param holiday
     * @return
     */
    int updateHoliday(@Param("moperDutyEtHoliday") MoperDutyEtHoliday moperDutyEtHoliday, @Param("holiday")String holiday);


    /**
     * 自动排班
     * @param dutyMonth
     * @return
     */
    List<MoperDutyEtHoliday> sel(@Param("dutyMonth")String dutyMonth);



    MoperDutyEtHoliday selectDutyHoliday(@Param("time")String time);

}
